<extend name="Public/common"/>
<block name="othercss">
<script type="text/javascript">
            var url_get_address = "{:U('get_address')}";
            var url_del_address = "{:U('Member/address_del')}";
            var url_add_address = "{:U('Member/address_add',array('type'=>'ajax'))}";
            var url_edit_address = "{:U('Member/address_edit',array('type'=>'ajax'))}";
            var url_checkout = "{:U('checkout')}";
            var url_success = "{:U('PayWechat/pay')}";
			var url_success2 = "{:U('PayAlipay/pay')}";
			var url_success3 = "{:U('success')}";
            var url_count_delivery = "{:U('count_delivery')}";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/common/artDialog6/css/ui-dialog.css" />
<script type="text/javascript" src="__PUBLIC__/common/artDialog6/dist/dialog-plus-min.js"></script>
 <script src="{$theme_path}/js/check.js?v=20190330_1.0"></script>
</block>
<block name="body">
<div class="mian">
    <div class="box">
        <div class="jssum">
            <div class="js1">
                <div class="jstitle">选择收货地址</div>
                <div class="table-w">
                    <div class="tables" id="address_list">
                      
                    </div>
                </div>
                <a class="btn" id="tanchu"  onclick="add_address()">增加收货地址</a>
            </div>
            <div class="jsli2">
                <div class="jstitle">备注</div>
                <div class="textarea">
                    <textarea name="remark_member" id="remark_member"></textarea>
                </div>
            </div>
            <div class="jsli3">
                <div class="jstitle">支付方式</div>
                <div class="textarea">
                  <input type="hidden" id="pay_type_1"  class="type pay_type pay_type_sel check" value="在线支付" />
                    <ul class="fangshi">
                        <li class="on" dir="支付宝"><i class="dian"></i><img src="{$theme_path}/images/zfb.png" /></li>
                        <li dir="微信"><i class="dian"></i><img src="{$theme_path}/images/wx1.png?52114" /></li>
                    </ul>
                    <input type="hidden" name="payment" id="payment" value="支付宝" />
                </div>
            </div>
            
             <div class="jsli3" style="margin-bottom:20px;">
              <div class="jstitle">配送方式</div>
    
            <div class="delivery_list">
            <div class="textarea">
                <div class="delivery_type_list"><span class="t">配送方式：</span>
                    <foreach name="delivery" item="delivery_item">
                        <input type="button" class="type delivery_type <if condition="$delivery_item.pay_last neq 1">no_pay_last</if>" rel="{$delivery_item.delivery_id}" value="{$delivery_item.delivery_name}" />
                    </foreach>
                </div>
                
                <div class="delivery_time"><span class="t">配送时间：</span>
         <label><input type="radio" name="delivery_time" value="任何时间" checked="checked" /> <span class="time">任何时间</span></label>
         <label><input type="radio" name="delivery_time" value="工作日" /> <span class="time">工作日</span></label>
         <label><input type="radio" name="delivery_time" value="非工作日" /> <span class="time">非工作日</span></label>
                </div>
                </div>
            </div>
               </div>
              
            </div>
            
  <input type="hidden" name="pay_type" id="pay_type" value="1" />
            <input type="hidden" name="sel_address_id" id="sel_address_id" value="{$address_default_id}" />
            <input type="hidden" name="sel_delivery_id" id="sel_delivery_id" value="0" />
            <div class="jsli3">
                <div class="jstitle">确认商品信息</div>
                <div class="textarea">
                    <div class="gwc2">
                        <ul class="clearfix">
                         
                            <li class="gt2" style="width:730px;">商品信息</li>
                            <li class="gt3">单价（元）</li>
                            <li class="gt4">数量</li>
                            <li class="gt5">金额（元）</li>
                           
                        </ul>
                        <table>
                           <foreach name="cart_list" item="cart_item">
                            <tr>
                              
                                <td class="gt2" style="width:730px;">
                                    <a class="clearfix"  href="{:U('Goods/index',array('id'=>$cart_item['goods_id']))}" target="_blank">
                                        <div class="lans">{$cart_item.goods_name}<br />
                                        商品编号：{$cart_item.goods_sn} &nbsp;&nbsp;<br /><span class="spec">{$cart_item.spec_array}</span>
                                        </div>
                                        <div class="imgs"><img src="__ROOT__{$cart_item.picture}" width="80" height="80"/></div>
                                    </a>
                                </td>
                                <td class="gt3">
                                    <span class="hui">{$cart_item.price_market}</span>
                                    <span class="hong">{$cart_item.price}</span>
                                </td>
                                <td class="gt4">
                                {$cart_item.num}
                                </td>
                                <td class="gt5">
                                    <span class="hong">{$cart_item.total}</span>
                                </td>
                            
                            </tr>
                           </foreach>
        
                        </table>
                    </div>
                </div>
                
                <ul class="lanjisuan">
                <if condition="$config.point_pay_can eq 1">
                    <li>
                         <if condition="$config.point_pay_can eq 1">
                        <div><label class="use_point" onclick="use_point_on()"><input type="hidden" value="0" id="use_point_on" name="use_point_on"  /> 使用积分抵扣</label></div>
                        <div class="point_use">可使用积分：<span class="n">{$member_point}</span>&nbsp;&nbsp;本次使用 <input type="text" name="txt_pay_point" id="txt_pay_point" value="{$member_point}" class="txt"/> 积分
                             &nbsp;<input type="button" onclick="use_point()" value="确定使用" class="sub" style="width:80px; background-color:#FFF;" />
                            (本次最多使用<span id="span_max_point"></span>积分，最多抵扣<span id="span_max_point_money"></span>元)
                        </div>
                    </if>
                    </li>
                    </if>
                    <notempty name="youhuiquan"> 
                    <li>
                 <span class="t">优惠劵：</span> <label><input type="checkbox" checked="checked" value="{$youhuiquan.id}" money="{$youhuiquan.money}" onclick="sel_yhq()" name="yhq_ids"><span style="color: #dd2727">{$youhuiquan.money}</span></label>&nbsp;&nbsp;
                   
                    </li>
                    </notempty>
                    
                    <li class="clearfix">
                       <span class="t">运费：</span><span class="red" id="span_total_delivery">0.00</span>
                    </li>
                    <li>
                      <p id="li_total_pay_point" style="display:none"><span class="t">积分抵扣：</span><span class="money">￥</span>- <span class="num_2" id="span_total_pay_point_money">0.00</span></p>
                    </li>
                    <li>
                        实付款：￥<span class="sfk" id="span_total_pay">{$cart_total|tofixed=2}</span>
                    </li>
                    <li>
                        <a class="return"><img src="{$theme_path}/images/return-icon.jpg" width="41" height="20"/> 返回购物车</a>
                        <a class="sub" onclick="checkout();">提交订单</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
</block>
<block name="otherjs">
                <input type="hidden" name="member_money" id="member_money" value="{$member_money}" />
                <input type="hidden" name="member_point" id="member_point" value="{$member_point}" />
                <input type="hidden" name="total_weight" id="total_weight" value="{$total_weight}" />
                <input type="hidden" name="total_cart" id="total_cart" value="{$cart_total|tofixed=2}" />
                <input type="hidden" name="total_delivery" id="total_delivery" value="0.00" />
                <input type="hidden" name="total_pay" id="total_pay" value="{$cart_total|tofixed=2}" />
                <input type="hidden" name="total_pay_money" id="total_pay_money" value="0" />
                <input type="hidden" name="total_point" id="total_point" value="0" />
                <input type="hidden" name="total_pay_point_money" id="total_pay_point_money" value="0" />
                <input type="hidden" name="point_1_to_money" id="point_1_to_money" value="{$config.point_1_to_money}" />
                <input type="hidden" name="point_pay_percent" id="point_pay_percent" value="{$config.point_pay_percent}" />
                <input type="hidden" name="max_point" id="max_point" value="0" />
                <input type="hidden" name="id" id="id" value="{$id}" />
                <input type="hidden" name="yhq_ids" id="yhq_ids" value="" /> 
                <input type="hidden" name="yhq_money" id="yhq_money" value="0" /> 

<script>
    $(function () {
        $('.jssum tr').hover(function () {
            $(this).children('td').addClass('bg');
        }, function () {
            $(this).children('td').removeClass('bg');
        })
        $('#tanchu').click(function(){
            $('.bg_heise').stop(true,true).fadeIn();
        })
        $('.bg_heise img').click(function(){
            $('.bg_heise').stop(true,true).fadeOut();
        })
        $('.fangshi li').click(function(){
            $('.fangshi li').removeClass('on');
			var payment = $(this).attr('dir');
			$('#payment').val(payment); 
            $(this).toggleClass('on');
        })
    })
</script>
 <notempty name="youhuiquan"> 
   <script type="text/javascript">
	sel_yhq();
    </script>
   </notempty>
</block>

